    
    public function {$actionName}($id)
    {
        // chequeo y obtengo el usuario loggeado
        $data['logueado'] = $this->getUsuarioLogueado();

        // valido permisos
        $gruposValidos = array();
        // ej. array('venta','logistica','contable','directivo');
        $this->validarPermisos($data['logueado'], $gruposValidos);

        // get the object to view
        $data['{$entity->singular}'] = new {$entity->singular|capitalize:true}($id);

        // Message Handler
        $data['msg'] = new PwMsgHandler();

        // purpose related actions to properly read the attributes
        $this->readPrepare($data);

        // laod view
        $this->smartyview->render('{$entity->singular}_{$actionName}.html', $data);

    } // function {$actionName}